package odometerDevice;

import java.util.ArrayList;
import java.util.List;

import odometerDevice.connectionDevice.IConnectionDevice;
import odometerDevice.sensor.ISensor;
import odometerDevice.sensor.category.ICompass;
import odometerDevice.sensor.category.IGyro;
import odometerDevice.sensor.category.IOdometry;
import training.controller.Sample;
import fusionMethod.IFusionMethod;

public abstract class OdometerDevice<T> {

	protected List<ISensor<IConnectionDevice>> sensors = new ArrayList<ISensor<IConnectionDevice>>();

	protected IFusionMethod fusionMethod;
	protected IGyro gyro;
	protected ICompass compass;
	protected IOdometry odometry;

	public OdometerDevice(IFusionMethod fusionMethod) {
		this.fusionMethod = fusionMethod;
	}

	public void setSensor(IGyro gyro) {
		this.gyro = gyro;
	}

	public void setSensor(ICompass compass) {
		this.compass = compass;
	}

	public void setSensor(IOdometry odometry) {
		this.odometry = odometry;
	}

	/**
	 * Renovar o valor dos sensores
	 */
	abstract void updateSensors();

	abstract Sample<T> getSensorsValue();

	abstract List<Sample<T>> getSensorsValue(int size);

	abstract void setPosition(Double x, Double y, Double alpha);

}
